<template>
    <div>
        <div v-for="(item, index) in state.dataList" :key="index">
            <div>{{item.name}}</div>
            <!-- <div></div>
            <div></div> -->
        </div>
    </div>
</template>
<script lang="ts">
import { watch,computed,ref, } from 'vue'
export default {
    setup(props,content){
        const state = reactive({
            roto:'',
            dataList:[
                {
                    id: 1,
                    father_id: 0,
                    status: 1,
                    name: '生命科学竞赛',
                    _child: [
                        {
                            id: 2,
                            father_id: 1,
                            status: 1,
                            name: '野外实习类',
                            _child: [{ id: 3, father_id: 2, status: 1, name: '植物学' }],
                        },
                        {
                            id: 7,
                            father_id: 1,
                            status: 1,
                            name: '科学研究类',
                            _child: [
                                { id: 8, father_id: 7, status: 1, name: '植物学与植物生理学' },
                                { id: 9, father_id: 7, status: 1, name: '动物学与动物生理学' },
                                { id: 10, father_id: 7, status: 1, name: '微生物学' },
                                { id: 11, father_id: 7, status: 1, name: '生态学' },
                            ],
                        },
                        { id: 71, father_id: 1, status: 1, name: '添加' },
                    ],
                },
                {
                    id: 56,
                    father_id: 0,
                    status: 1,
                    name: '考研相关',
                    _child: [
                        { id: 57, father_id: 56, status: 1, name: '政治' },
                        { id: 58, father_id: 56, status: 1, name: '外国语' },
                    ],
                },
            ]
        })
        getPath(url){
            this.$router.push({path:url})
        }

        return {
            state
        }
    }
}
</script>